import axios from '../../../api/articles';

export default {
  async axios_get_articles(store) {
    const dataList = await axios.getArticles();
    // console.log('dataList=', !!dataList);
    if (dataList && dataList.data.length > 0) {
      store.commit('getArticles', dataList.data);
    } else {
      store.commit('getArticles', []);
    }
  },
  axios_get_articles_detal(store, data) {
    // 从后台获取数据
    store.commit('get_detail', data);
  },
};
